package com.wuye.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.text.SimpleDateFormat;
import org.apache.commons.lang3.builder.*;

@Entity
@Table(name="wuye_order")
public class Order implements Serializable{
	@Id
	@Column(name = "order_num")
	private String orderNum;
	public String getOrderNum(){
		return this.orderNum;
	}
	public void setOrderNum(String arg){
		this.orderNum=arg;
	}

	@Column(name = "user_id")
	private String userId;
	public String getUserId(){
		return this.userId;
	}
	public void setUserId(String arg){
		this.userId=arg;
	}
	@Column(name = "cell_phone")
	private String cellPhone;
	public String getCellPhone(){
		return this.cellPhone;
	}
	public void setCellPhone(String arg){
		this.cellPhone=arg;
	}
	@Column(name = "user_name")
	private String userName;
	public String getUserName(){
		return this.userName;
	}
	public void setUserName(String arg){
		this.userName=arg;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "order_date")
	private Date orderDate;
	public Date getOrderDate(){
		return this.orderDate;
	}
	public void setOrderDate(Date arg){
		this.orderDate=arg;
	}
	public String getStringOrderDate(){
		SimpleDateFormat fmt=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		return fmt.format(this.orderDate);
	}


	@Temporal(TemporalType.TIME)
	@Column(name = "expected_time")
	private Date expectTime;
	public Date getExpectTime(){
		return this.expectTime;
	}
	public void setExpectTime(Date arg){
		this.expectTime=arg;
	}
	public String getStringExpectTime(){
		SimpleDateFormat fmt=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		return fmt.format(this.expectTime);
	}

	@Column(name = "order_state")
	private String orderState;
	public String getOrderState(){
		return this.orderState;
	}
	public void setOrderState(String arg){
		this.orderState=arg;
	}

	@Column(name = "total_price")
	private Float totalPrice;
	public Float getTotalPrice(){
		return this.totalPrice;
	}
	public void setTotalPrice(Float arg){
		this.totalPrice=arg;
	}

	@Column(name = "pay_method")
	private String payMethod;
	public String getPayMethod(){
		return this.payMethod;
	}
	public void setPayMethod(String arg){
		this.payMethod=arg;
	}

	@Column(name = "memo")
	private String memo;
	public String getMemo(){
		return this.memo;
	}
	public void setMemo(String arg){
		this.memo=arg;
	}
	@Override
	public String toString() {
		try {
			return ReflectionToStringBuilder.toString(this,ToStringStyle.MULTI_LINE_STYLE);
		} catch (Exception e) {
			return e.getMessage();
		}
	}
}